home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Atari Compendium
/
The Atari Compendium (Toad Computers) (1994).iso
/
files
/
umich
/
network
/
mail
/
mail110.lzh
/
LIST.C
< prev
next >
Wrap
C/C++ Source or Header
|
1994-02-25
|
2KB
|
82 lines
//=========================================================
//
// list.c
//
// void listqueue(void)
//
//=========================================================
// $Id: list.c,v 1.3 1994/02/25 13:34:54 gbj Exp user $
/*
$Log: list.c,v $
* Revision 1.3 1994/02/25 13:34:54 gbj
* Tidy-up.
*
* Revision 1.2 1994/02/08 23:32:02 gbj
* First public release.
*
* Revision 1.1 1994/02/08 03:15:10 gbj
* Initial revision
*
*/
#include "mailer.h"
void listqueue(void)
{
char pattern[128], *p;
long res;
int line, done, c;
struct FILEINFO info, *dta;
strcpy(pattern, mqueuepath);
strcat(pattern, "\\*.txt");
line=0;
done=FALSE;
c='\0';
dta=(struct FILEINFO*)Fgetdta();
Fsetdta(&info);
res=Fsfirst(pattern, 0);
while (res == 0)
{
p=strrchr(info.name, '\\');
if (p == NULL)
p=info.name;
else
p++;
printf("%s\n", p);
line++;
if (line > 15)
{
done=FALSE;
while (!done)
{
printf("\n(C)ontinue or (Q)uit? ");
c=toupper(getche());
putchar('\r');
putchar('\n');
if (c == 'Q')
done=TRUE;
else if (c == 'C')
{
done=FALSE;
line=0;
}
}
}
if (done)
res=-1;
else
res=Fsnext();
}
Fsetdta(dta);
printf("Press a key...");
getch();
putchar('\n');
return;
}